// pages/first/street food/street food.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    foodList: [
      {
        "id": 0,
        "src": "http://1img.mgtv.com/preview/sp_images/2017/shenghuo/309467/4013194/20170714152514715.jpg",
        "desc": "水果的Freestyle吃法"
      },
      {
        "id": 1,
        "src": "http://0img.mgtv.com/preview/sp_images/2017/shenghuo/309467/4013195/20170714154245327.jpg",
        "desc": "河虾"
      },
      {
        "id": 2,
        "src": "http://3img.mgtv.com/preview/sp_images/2017/shenghuo/309467/4013190/20170714151445401.jpg",
        "desc": "红薯的两种洋气吃法"
      },
      {
        "id": 3,
        "src": "http://0img.mgtv.com/preview/sp_images/2017/shenghuo/309467/3990142/20170629153952135.jpg",
        "desc": "绿豆糕"
      },
      {
        "id": 4,
        "src": "http://2img.mgtv.com/preview/sp_images/2017/shenghuo/309467/3896104/20170411153342124.jpg",
        "desc": "草头圈子"
      }
    ],
 
  foodPicture: [
    {
      "id": 0,
      "src": "http://images.meishij.net/p/20101115/7bc7f7ab32cc2d6aaea5ffd8559ddf56.jpg",
      "desc": "炒在菜里的肉丝肉片都不算肉，纯粹的肉肉才能贴膘。"
    },
    {
      "id": 1,
      "src": "https://s1.st.meishij.net/rs/152/221/9805402/n9805402_151133242452794.jpg",
      "desc": "调制好的清炖乌鸡汤，汤色清，清汤中泛起点点油花，乌鸡肉酥而不散。"
    },
    {
      "id": 2,
      "src": "http://images.meishij.net/p/20110329/bd7b590769d40f3be9699127269549c9.jpg",
      "desc": "沙湾人把凝结叫埋于是“姜撞奶”在沙湾也叫“姜埋奶”"
    },
     {
      "id": 3,
      "src": "http://images.meishij.net/p/20120413/7188c8c9bfe17b829a08e9a4b5fd7737.jpg",
      "desc": "虎皮青椒，又叫虎皮海椒，是以青椒为主要材料制作的一道菜品",
      "title": "街坊美食",
      "src2": "http://2img.mgtv.com/preview/sp_images/2017/shenghuo/291200/3768932/20170105161110380.jpg"
    },
    {
      "id":4,
      "src": "https://s1.st.meishij.net/rs/199/170/3917699/n3917699_142906235435395.jpg",
      "desc": "麻辣鸡块是一道非常好吃的肉类食品，干香味美，很多人喜欢吃麻辣鸡块",
      "title": "香辣小吃",
      "src2": "http://2img.mgtv.com/preview/sp_images/2017/shenghuo/309467/3896104/20170411153342124.jpg"
    },
    {
      "id": 5,
      "src": "https://s1.st.meishij.net/rs/00/00//n_154518135646133.jpg",
      "desc": "酸汤肥牛，是很多川菜馆的常见名菜，属于川菜，适宜于病后调养的人食用",
      "title": "绝顶美食",
      "src2": "http://0img.mgtv.com/preview/sp_images/2017/shenghuo/309467/3990142/20170629153952135.jpg"
    },
    {
      "id": 6,
      "src": "http://images.meishij.net/p/20110218/5985ce73250273ea1c8cb38cacb10c8d.jpg",
      "desc": "酱猪蹄是一道传统名菜，在各大菜系中大都有此菜。咸香，酥软，色艳",
      "title": "大猪蹄子",
      "src2": "http://3img.mgtv.com/preview/sp_images/2017/shenghuo/309467/4013190/20170714151445401.jpg"
    }
  ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  //事件处理函数
  bindViewTap: function (e) {
    console.log(e.currentTarget.id)
    var id = e.currentTarget.id
    if (id == 0) {
      wx.navigateTo({
        url: '../dishes/cake/cake'
      })
    }
    if (id == 1) {
      wx.navigateTo({
        url: '../dishes/soup/soup'
      })
    }
    if (id == 2) {
      wx.navigateTo({
        url: '../detail/detail'
      })
    }

  },
  bindDetail:function(e){
    wx.navigateTo({
      url: '/pages/first/street food/detail/detail'
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})